﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DochazkaKlient.User.Activity.Views
{
    public partial class ActivityList : UserControl
    {
        public ActivityList()
        {
            InitializeComponent();
        }

        private void activityBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
            this.Validate();
            this.activityBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.dochazkaDataSet);
        }

        private void ActivityList_Load(object sender, EventArgs e)
        {
            activityTableAdapter.FillBy(dochazkaDataSet.Activity);
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            Form form = new Form();
            form.Text = "Blablabla";
            form.Show();

            ActivityDetail ad = new ActivityDetail(activityBindingSource.DataSource);
            ad.Parent = form;
            ad.Dock = DockStyle.Fill;
            ad.Show();
        }
    }
}
